﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="fck_video_upload.aspx.cs" Inherits="ElingOA5_AdminSysMan.Web.fckeditor.editor.plugins.easyUpload.fck_video.fck_video_upload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   
     <link href="../../../../../Content/mediaUpLoad.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../../../../Scripts/SWFUpload/js/swfupload.js"></script>

    <script type="text/javascript" src="../../../../../Scripts/SWFUpload/js/swfupload.swfobject.js"></script>

    <script type="text/javascript" src="../../../../../Scripts/SWFUpload/js/swfupload.queue.js"></script>

    <script type="text/javascript" src="../../../../../Scripts/SWFUpload/js/fileprogress.js"></script>

    <script type="text/javascript" src="../../../../../Scripts/SWFUpload/js/fck_video_handlers.js"></script>        

     <script type="text/javascript" src="fckVideo.js"></script>   

    <script type="text/javascript">
          
        var swfu;
        var furl = "0";
        SWFUpload.onload = function () {

            var settings = {

                flash_url: "../../../../../Scripts/SWFUpload/swf/swfupload.swf",
                upload_url: "<%=upload_url %>",
                file_size_limit: "<%=file_size_limit %>",
                file_types: "<%=file_types %>",
                file_types_description: "<%=file_types %>",
                file_upload_limit: "<%=file_upload_limit %>",
                file_queue_limit: 0,
                custom_settings: {
                    progressTarget: "fsUploadProgress",
                    cancelButtonId: "btnCancel",
                    uploadButtonId: "btnUpload",
                    myFileListTarget: "idFileList"
                },
                debug: false,
                auto_upload: false,

                // Button Settings
                button_image_url: "<%=button_image_url %>",   // Relative to the SWF file   
                button_placeholder_id: "spanButtonPlaceholder",
                button_width: 61,
                button_height: 22,

                // The event handler functions are defined in handlers.js   
                swfupload_loaded_handler: swfUploadLoaded,
                file_queued_handler: fileQueued,
                file_queue_error_handler: fileQueueError,
                file_dialog_complete_handler: fileDialogComplete,
                upload_start_handler: uploadStart,
                upload_progress_handler: uploadProgress,
                upload_error_handler: uploadError,
                upload_success_handler: uploadSuccess,
                upload_complete_handler: uploadComplete,
                queue_complete_handler: queueComplete, // Queue plugin event   

                // SWFObject settings   
                minimum_flash_version: "9.0.28",
                swfupload_pre_load_handler: swfUploadPreLoad,
                swfupload_load_failed_handler: swfUploadLoadFailed
            };

            swfu = new SWFUpload(settings);
        }

        function UploadFile() {
            furl = "1";        
            swfu.startUpload();
        }

        //furl= 0:未选择上传的文件   =1:文件正在上传  =2:文件上传失败 
        function Ok() {
            if (furl == "0") {
                alert("请选择要上传的文件!");
            } else if (furl == "1") {
                alert("文件正在上传/转换中，请上传成功后再按确定按钮!");
            } else if (furl == "2") {
                alert("文件已上传失败，请重新操作!");
            } else {
                //组合相关的HTML代码
                var oEditor1 = window.parent.InnerDialogLoaded().FCK;
                oEditor1.InsertHtml(furl);
                return true;
            }
            return false;
        }

    </script>
</head>
<body>
     <form runat="server" id="form2">
    <table width="100%" cellspacing="4" cellpadding="4" border="0" bgcolor="#FCFCFC">
        <tr>
            <td class="DH1">
                <table width="100%" cellspacing="4" cellpadding="4" border="0" bgcolor="#FCFCFC">
                    <tr>
                        <td class="DH2">
                            <strong>
                                <%=DesTitle%></strong> </td>
                        <td class="DH2" align="right">
                        </td>
                    </tr>
                </table>
                <div id="content">
                    <form id="form1" enctype="multipart/form-data">
                    <span id="spanButtonPlaceholder"></span>
                    <table id="idFileList" class="uploadFileList">
                        <tr class="uploadTitle">
                            <td>
                                <b>文件名</b></td>
                            <td>
                                <b>文件大小</b></td>
                            <td width="100px">
                                <b>状态</b></td>
                            <td width="35px">
                                &nbsp;</td>
                        </tr>
                    </table>
                    等待上传 <span id="idFileListCount">0</span> 个 ，成功上传 <span id="idFileListSuccessUploadCount">0</span> 个                
                     
                    <div id="divSWFUploadUI" style="visibility: hidden;">
                    </div>
                    </form>
                </div>
                <noscript style="display: block; margin: 10px 25px; padding: 10px 15px;">
                    很抱歉，相片上传界面无法载入，请将浏览器设置成支持JavaScript。
                </noscript>
                <div id="divLoadingContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
                    相片上传界面正在载入，请稍后...
                </div>
                <div id="divLongLoading" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
                    相片上传界面载入失败，请确保浏览器已经开启对JavaScript的支持，并且已经安装可以工作的Flash插件版本。
                </div>
                <div id="divAlternateContent" class="content" style="background-color: #FFFF66; border-top: solid 4px #FF9966; border-bottom: solid 4px #FF9966; margin: 10px 25px; padding: 10px 15px; display: none;">
                    很抱歉，相片上传界面无法载入，请安装或者升级您的Flash插件。 请访问： <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Adobe网站</a> 获取最新的Flash插件。
                </div>
                <div>
                <table width="90%" cellspacing="0" cellpadding="0" border="0"  ">
                    <tr>
                        <td colspan="2">
                            <input id="btnUpload" type="button" value="开始上传" class="btn" style="display:none" />&nbsp;
                            <input id="UploadFile" type="button" value="开始上传" class="btn" onclick="UploadFile()" />
                            <input id="btnCancel" type="button" value="取消全部上传" disabled="disabled" class="btn" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"> 
                            <br />
                            <font style="color:Red">注意：上传非flv文件时，系统会自动把该文件转换为flv文件，在转换过程中请耐心等待，不要进行其他的操作！</font>
                    
                        </td>
                    </tr>
                </table>
                </div> </td>
        </tr>
    </table>
    </form>

</body>
</html>
